package com.ctshk.rpc.ship.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.rpc.ship.dto.ShipProductCostDateDTO;
import com.ctshk.rpc.ship.entity.ShipProductCostTourist;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 船票产品成本-旅客成本表 Mapper 接口
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-03-05
 */
public interface ShipProductCostTouristMapper extends BaseMapper<ShipProductCostTourist> {

    @Select("<script>" + "SELECT " +
            "t3.id,t3.cost_name as costName,t3.currency_id as currencyId,t3.currency_name as currencyName,t3.daily_stock as dailyStock " +
            "FROM " +
            " t_ship_product_cost t3  \n" +
            "WHERE t1.is_deleted = 0 " +
            "<if test=\"ProductId != null and ProductId != ''\">AND t3.ship_product_id = #{ProductId}</if> \n" +
            "</script>")
    List<ShipProductCostDateDTO> getShipProductCostDateList(Long costId);
}
